﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MadProps.Validation
{
    static class ValidationModelFactory
    {
        public static ValidationModel Build(Composition composition, IProp prop)
        {
            var validator = new CompositeValidator(composition.ResolveAll<IValidator>());
            return new ValidationModel(prop, validator);
        }
    }
}
